/***************************************************
> Copyright (C) 2024 ==LENA== All rights reserved.
> File Name: 7.10上午.c
> Author: lena
> Mail:lena_li@126.com
> Created Time: 2024年07月09日 星期二 19时56分05秒
 ***************************************************/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
void mystrcopy(char *dest,const char*src);	
int main(int argc,const char* argv[])
{ char dest[10]={0},src[100]={0};
	printf("dest=\n");
	scanf("%s",dest);
	printf("src=\n");
	scanf("%s",src);
	mystrcopy(dest,src);
	printf("%s",dest);
	return 0;
}
void mystrcopy(char *dest,const char*src){	
	int i =0,j=0;
	//char str[] = "hello" 初始化自动添加结束标志
	while(dest[j] != '\0')
	{
		while(src[j]!='\0'){
			dest[j] = src[j];
			j++;}
		dest[j] = '\0'; }
}
